const sendMessage = (content, action) => {
    // 建立socket连接
    wx.sendSocketMessage({
        data: JSON.stringify({
            content: content, // 用户id
            action: action,
            type: 0
        })
    })
}
/**
 * 连接服务器
 * @param {long} id 当前登录用户的id 
 */
const connectSocketServer = (id) =>{
    sendMessage(id,1);
}

module.exports = {
    connectSocketServer,
    sendMessage
}